<template>
	<view>
		<view class="head">
			<view class="top">
				<view class="arrow" @click="ruturn_btn">
				</view>
				<view style="color: white; font-size: 48rpx;">车辆维修</view>
			</view>
			<uni-card spacing="5px">
				<map style="height: 70vh;width: auto;" :latitude="latitude" :longitude="longitude"
					:markers="covers"></map>
				<view>
					<view class="line1">
						<view>
							车百事汽车生活馆
						</view>
						<view>
							556m
						</view>
					</view>
					<view class="line2">
						<view class="line2left">
							<view style="display: flex;">
								<uni-rate :readonly="true" size="20" :value="2" />
								4分
							</view>
							<view>
								营业时间：周一到周五 早上8:00-晚上22:00
							</view>
							<view>
								位置：山阳区人民路与解放路交叉口
							</view>
						</view>
						<view class="line2right">
							<image src="../../../static/uni.png" style="height: 10vh;width: 20vw;"></image>
						</view>
					</view>
					<u-action-sheet :actions="list" @close="onCloseAction" @select="selectClick"
						:cancelText="qvxiaowenzi" :closeOnClickOverlay="true" :closeOnClickAction="true"
						:show="show"></u-action-sheet>
					<view class="butt">
						<view><u-button shape="circle" @click="show = true"
								customStyle="backgroundColor:#136AEB;width:40vw">
								<image src="/static/images/ys/carFix/phone.png"
									style="height: 2.5vh;width: 4.5vw;margin-right: 3vw;"></image><text
									style="color: white;">联系门店</text>
							</u-button>
						</view>
						<view>
							<u-button shape="circle" customStyle="backgroundColor:#FF5219;width:40vw">
								<image src="/static/images/ys/carFix/yuyue.png"
									style="height: 2.5vh;width: 4.5vw;margin-right: 3vw;"></image><text
									style="color: white;">立即预约</text>
							</u-button>
						</view>
					</view>
				</view>
			</uni-card>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				qvxiaowenzi: "取消拨号",
				id: 0, // 使用 marker点击事件 需要填写id
				title: 'map',
				latitude: 39.909,
				longitude: 116.39742,
				covers: [{
					latitude: 39.909,
					longitude: 116.39742,
					iconPath: '/static/images/ys/carFix/zuobiao.png',
					iconPath: '/static/images/ys/carFix/dialog.png'
				}],
				list: [{
						name: '13865432154'
					},
					{
						name: '复制'
					}
				],
				show: false
			}
		},
		methods: {
			selectClick(index) {
				console.log(index)
				this.show = false
			},
			onCloseAction(index) {
				console.log('关闭动作被触发，索引：', index);
				this.show = false;
			},
			ruturn_btn() {
				uni.$u.route({
					url: '/pages/index/index',
					type: 'tab'
				})
			}
		}
	}
</script>

<style>
	.butt {
		display: flex;
		justify-content: space-between;
		margin-top: 1vh;
	}

	.line2right {
		padding-top: 1vh;
		padding-left: 2vw;
		box-sizing: border-box;
	}

	.line2 {
		display: flex;
	}

	.line2left {
		margin-top: 1vh;
		text-align: left;
		font-size: 25rpx;
	}

	.line1 {
		margin-top: 2vh;
		display: flex;
		justify-content: space-between;
	}

	.line1 :nth-child(1) {
		font-size: 3vh;
		font-weight: 600;
	}

	.line1 :nth-child(2) {
		color: #2F81FA;
	}

	.top {
		background-color: #2F81FA;
		width: 100%;
		height: 20%;
		position: fixed;
		position: relative;
		text-align: center;
		padding-top: 4%;
		box-sizing: border-box;
	}

	.arrow {
		height: 28rpx;
		width: 28rpx;
		border-top: 4rpx solid white;
		border-right: 4rpx solid white;
		transform: rotate(225deg);
		position: absolute;
		left: 3%;
	}

	.head {
		position: relative;
		text-align: center;
		height: 35vh;
		width: 100%;
		background-color: #2F81FA;
	}
</style>